<script setup>
import { reactive } from 'vue'

// do not use same name with ref
const form = reactive({
  name: '',
  region: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: '',
})

const onSubmit = () => {
  console.log('submit!')
}
</script>

<template>
   <div style="display: flex">
     <el-form :model="form" label-width="auto" style="display: flex;width: 500px;
flex-wrap: wrap;padding: 20px" >
       <el-form-item label="商家信息：" >
         <el-input v-model="form.name" />
       </el-form-item>
       <el-form-item label="商家名称：">
         <el-input v-model="form.name" />
       </el-form-item>


       <el-form-item label="创建时间">
         <el-col :span="11">
           <el-date-picker
               v-model="form.date1"
               type="date"
               placeholder="开始时间"
               style="width: 100%"
           />
         </el-col>
         <el-col :span="2" class="text-center">
           <span class="text-gray-500">-</span>
         </el-col>
         <el-col :span="11">
           <el-time-picker
               v-model="form.date2"
               placeholder="结束时间"
               style="width: 100%"
           />
         </el-col>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="onSubmit" style="background-color: #42b983">查询</el-button>
         <el-button>重置</el-button>
       </el-form-item>
       <el-form-item label="Instant delivery">
         <el-switch v-model="form.delivery" />
       </el-form-item>

       <el-form-item label="核验筛选：">
         <el-select v-model="form.region" placeholder="请选择">
           <el-option label="Zone one" value="shanghai" />
           <el-option label="Zone two" value="beijing" />
         </el-select>
       </el-form-item>
       <el-form-item label="认证筛选：">
         <el-select v-model="form.region" placeholder="请选择">
           <el-option label="Zone one" value="shanghai" />
           <el-option label="Zone two" value="beijing" />
         </el-select>
       </el-form-item>
       <el-form-item label="保证金筛选">
         <el-select v-model="form.region" placeholder="请选择">
           <el-option label="Zone one" value="shanghai" />
           <el-option label="Zone two" value="beijing" />
         </el-select>
       </el-form-item>
         <el-button type="primary" @click="onSubmit">Create</el-button>
         <el-button>Cancel</el-button>
     </el-form>
   </div>
</template>

<style scoped lang="scss">
*{
  background-color: #FFFFFF;
}
</style>